<template>
  <div class="contain">
    <div class="header">
      <div class="tab">
       <ul>
          <li @click='tabIndex=0' :class="{active: tabIndex===0? true:false}"><a>Introduction</a><a></a></li>
          <li @click='tabIndex=1' :class="{active: tabIndex===1? true:false}"><a>Process</a><a></a></li>
          <li @click='discussion()' :class="{active: tabIndex===2? true:false}"><a>Discusion</a><a></a></li>
        </ul>
     </div>
    </div>
    <introduction v-if='tabIndex==0'/>
    <process v-if='tabIndex==1'/>
    <!-- <discusion v-if='tabIndex==2'/> -->
  </div>
</template>
<script>
import Introduction from './introduction'
import Process from './process'
// import Discusion from './discusion'
export default {
  data() {
    return {
      tabIndex: 0
    }
  },
  components: {
    Introduction,
    Process
  },
  methods: {
    changeStatus() {
      this.tabIndex = 0
    },
    discussion() {
      this.$router.push('/discussion')
    }
  },
  mounted() {
    this.tabIndex = 0
  }
}
</script>
<style lang="less" scoped>
// .contain{
//   background: #f5f5f5;
// }
.active{
  position: relative;
  // padding-bottom: 3px;
  a:nth-child(1){
    float: left;
    overflow: hidden;
  }
  a:nth-child(2){
    display: inline-block;
    height: 1px;
    width: 20px;
    background: #fff;
    position: absolute;
    bottom: 6px;
    left: 40%;
  }
}
.header{
  height: 250px;
  width: 100%;
  background: #fff;
  position: relative;
  .tab{
    line-height: 40px;
    width: 100%;
    background: rgba(197, 51, 46, .9);
    position: absolute;
    bottom: 0;
    left: 0;
    ul{
      width:92%;
      margin: 0 auto;
      display: flex;
      justify-content: space-between;
      li{
         a{
           color: #fff;
         }
      }
    }
  }
}
</style>
